/*
 目标: 配置Redux调试工具
  
*/
import { applyMiddleware, legacy_createStore as createStore } from "redux";
import { composeWithDevTools } from "redux-devtools-extension";
import thunk from "redux-thunk";
import rootReducer from "./reducer";
// 1. 下包 redux-devtools-extension
// 2. chrome装插件
// 3. 配置调试工具
// 4. 重启打包和浏览器

const store = createStore(
  rootReducer,
  // 口诀: 工具 包住 应用, 应用 包住 中间件
  // composeWithDevTools(applyMiddleware(thunk))
  composeWithDevTools(applyMiddleware(thunk))
);
export default store;
